The present invention is generally related to graphical image manipulation systems, and more particularly to a method for compositing multiple graphical images.
Many graphical image manipulation computer programs, such as Adobe.RTM. Photoshopg.RTM.4.0, from Adobe Systems Incorporated, of San Jose, Calif., build a final image by compositing several image layers together. The image layers may be thought of as stacked sheets of acetate. The density of the ink on the acetate controls the transparency of the sheet, i.e., the extent to which that sheet obscures the images from the underlying sheets. In the computer program, the color and density of the ink on the acetate sheet are represented by a color value and an opacity (or "alpha") value, respectively.
Each layer typically includes image data, an optional mask, and compositing controls. Typically, the image data is represented by an array of pixels, with each pixel having a color and, optionally, an opacity. Similarly, the mask is represented by an array of pixels, with each pixel having an opacity. Alternatively, the image data or the mask or both can be defined analytically, e.g., by using shape outlines, or by other functions which map positions to color and opacity. In addition, the image data and the mask can be dynamic, i.e., computed from other data at the time the layers are composited.
The compositing controls may include a transfer mode, also known as a blending mode. The transfer mode of an image layer determines how the color in the image layer mixes with the color accumulated from the underlying layers.
Image layers are generally composited in order from bottom to top. The general process for compositing an image layer begins with calculation of any dynamic data in the image layer, such as the color of the pixels in the image and the opacity of the pixels in the mask. Then, the opacity is determined for each pixel from the mask, the global opacity, if any, and the image data. Finally, the color of each pixel in the layer is combined with the color of the corresponding pixel in an accumulation buffer to generate a new composited color. The combination is controlled by the opacity of the pixel and the transfer mode.
Further information on compositing image layers may be found in commonly-owned U.S. patent application Ser. No. 08/703,024 filed Aug. 26, 1996 to Hamburg et al. for Adjustment Layers for Composited Image Manipulation, incorporated here by this reference.